package com.ldg.rocketmq.config;

import org.apache.rocketmq.client.producer.DefaultMQProducer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: Liudao
 * @Date: 2022-09-30-15:07
 * @Description:
 */
@Configuration
public class RockmqProducerConfig {

    @Bean
    public DefaultMQProducer defaultMQProducer(){
        DefaultMQProducer defaultMQProducer = new DefaultMQProducer();
        defaultMQProducer.setNamesrvAddr("192.168.56.110:9876");
        defaultMQProducer.setProducerGroup("producer-group");
        return defaultMQProducer;
    }
}
